package org.javaboy.fmall.service.generateTableToFieldService.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.javaboy.fmall.entity.SysTable;
import org.javaboy.fmall.mapper.TableGenerateMapper;
import org.javaboy.fmall.service.generateTableToFieldService.TableGenerateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Iterator;
import java.util.List;

/**
 * @ClassName TableGenerateServiceImpl
 * @Description
 * @Author find me
 * @Date 2020/7/18 0018 17:52
 * @Version 1.0
 */
@Service
public class TableGenerateServiceImpl implements TableGenerateService {

    @Autowired
    TableGenerateMapper tableGenerateMapper;

    /**
     * 1.生成前，查询此表是否生成，若生成，则不再重复生成
     * 2.没有生成，则生成此表，
     *
     * @param tableName
     */
    @Override
    public  List<JSONObject> getGenerateAllTable(List<String> tableName) {

        List<JSONObject> generateAllTable = tableGenerateMapper.getGenerateAllTable(tableName);
        System.out.println(generateAllTable.toString());
        return null;

    }
}
